package com.sea.human.mapper;

import com.sea.human.entity.Performance;
import org.apache.ibatis.annotations.Param;
import sun.misc.Perf;

import java.util.List;

public interface PerformanceMapper {
    /**
     * 查询各个状态下的
     * @param performance
     * @return
     */
    List<Performance> findStatusNumber(Performance performance);
    /**
     * 条件查询
     * @param performance
     * @return
     */
    List<Performance> findByCnd(Performance performance);

    /**
     * 新增绩效
     * @param performance
     * @return
     */
    int insert(Performance performance);

    /**
     * 更新绩效
     * @param performance
     * @return
     */
    int update(Performance performance);

    /**
     * 查询需要打分的记录
     * @param performance
     * @return
     */
    List<Performance> findGradeByUser(Performance performance);

    /**
     * 更新评分
     * @param id
     * @return
     */
    int updateScore(Integer id);

    /**
     * 查询指定
     * @param id
     * @return
     */
    Performance findById(Integer id);

    /**
     * 根据日期状态返回该数量
     * @param performanceStatus
     * @param performanceDate
     * @return
     */
    Integer findNumberByDateStatus(@Param("performanceStatus")Integer performanceStatus,@Param("performanceDate") String performanceDate);

    /**
     * 返回当月未提交数量
     * @param performanceDate
     * @return
     */
    Integer findPerformanceNumber(@Param("performanceDate") String performanceDate);

    /**
     * 更新绩效用户组
     * @param groupName
     * @param userName
     * @return
     */
    Integer updateGroupByUserName(@Param("groupName")String groupName,@Param("userName")String userName);


}
